package com.company.project.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.company.project.mapper.CommonUserMapper;
import com.company.project.entity.CommonUserEntity;
import com.company.project.service.CommonUserService;
import com.company.project.vo.resp.CommonUserWithAreaDTO;


@Service("commonUserService")
public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonUserEntity> implements CommonUserService {

	@Resource
	private CommonUserMapper commonUserMapper;
	
	@Override
	public void addCommonUser(CommonUserEntity entity) {
		commonUserMapper.insert(entity);	
	}

	@SuppressWarnings("rawtypes")
	@Override
	public IPage<CommonUserWithAreaDTO> getList(Page page,String startTime,String endTime, String area) {
		return commonUserMapper.getList(page, startTime, endTime, area);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public IPage<CommonUserWithAreaDTO> getListLastDay(Page page, String startTime, String endTime, String area) {
		return commonUserMapper.getListLastDay(page, startTime, endTime, area);
	}
}